package com.example.project.dao;

import com.example.project.dao.sqls.TableAProvider;
import com.example.project.dao.sqls.TableBProvider;
import com.example.project.entity.TableA;
import com.example.project.entity.TableB;
import org.apache.ibatis.annotations.*;

import java.util.List;

/**
 * Created by Ethan on 2022-08-25 18:06
 */
@Mapper
public interface TableBDao {
    @SelectProvider(type = TableBProvider.class, method = "findAllSql")
    List<TableB> findAll();

    @InsertProvider(type = TableBProvider.class, method = "insertSql")
    void saveTableB(TableB tableB);

    @DeleteProvider(type = TableBProvider.class, method = "deleteSql")
    void deleteByC(String c);

    @UpdateProvider(type = TableBProvider.class, method = "updateSql")
    void update(TableB tableB);

    @SelectProvider(type = TableBProvider.class, method = "getSumAaSql")
    int getSumOfAa();

    @SelectProvider(type = TableBProvider.class, method = "getSumCoAaSql")
    int getSumOfCoAa();

    @SelectProvider(type = TableBProvider.class, method = "getSumBbSql")
    int getSumOfBb();

    @SelectProvider(type = TableBProvider.class, method = "getSumCoBbSql")
    int getSumOfCoBb();

    @SelectProvider(type = TableBProvider.class, method = "getSumCcSql")
    int getSumOfCc();

    @SelectProvider(type = TableBProvider.class, method = "getSumCoCcSql")
    int getSumOfCoCc();

    @SelectProvider(type = TableBProvider.class, method = "getSumDdSql")
    int getSumOfDd();

    @SelectProvider(type = TableBProvider.class, method = "getSumCoDdSql")
    int getSumOfCoDd();

    @SelectProvider(type = TableBProvider.class, method = "getSumEeSql")
    int getSumOfEe();

    @SelectProvider(type = TableBProvider.class, method = "getSumCoEeSql")
    int getSumOfCoEe();
}
